﻿<navigation:Page xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"  x:Class="WebRSSBuilder.ViewRss" 
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
           xmlns:vm="clr-namespace:WebRSSBuilder.Models"
           xmlns:datacontrols="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.DataForm.Toolkit"
           Title="ViewRss Page" mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" FontWeight="Bold"
                Width="Auto" d:DesignHeight="700">
    <UserControl.Resources>
     <vm:RSSViewModel x:Key="MyViewModel"/>
    </UserControl.Resources>
    <ScrollViewer Height="auto">
    <StackPanel >
       

        <Grid x:Name="Root" DataContext="{Binding Source={StaticResource MyViewModel}}" Margin="50,0,0,0">
            <Grid.RowDefinitions>
                <RowDefinition Height="40"  />
                <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
            <ColumnDefinition Width="300" />
            <ColumnDefinition Width="Auto" />
        </Grid.ColumnDefinitions>
                <Border Grid.Column="1" Height="31">
                    <Button x:Name="Save" Margin="-250,4,0,1"  Command="{Binding SaveCommand}" Grid.Column="1" Grid.Row="0" Width="75" Height="23" FontFamily="Arial"  Content="Save" />
                </Border>
                <Border Grid.Column="1" Height="31" >
                    <Button x:Name="Cancel" Margin="250,4,0,1" Command="{Binding LoadCommand}" Grid.Column="1" Grid.Row="0" Width="75" Height="23" FontFamily="Arial"  Content="Cancel" />
                </Border>
                <sdk:TabControl  HorizontalAlignment="Left" Margin="0,2,0,0" Name="tabControl1" VerticalAlignment="Top" Width="Auto" Grid.Column="0" Grid.Row="1"  >
            <sdk:TabItem Header="Feed Properties" Name="FeedProperties">
                
                <Grid Height="441">
                    <sdk:Label Content="Title" Height="23" HorizontalAlignment="Left" Margin="10,10,0,0" Name="label1" VerticalAlignment="Top" Width="50" />
                            <TextBox Height="23" HorizontalAlignment="Left" Margin="96,10,0,0" Name="textBoxTitle" VerticalAlignment="Top" Width="120" Text="{Binding Path=Feed.Title, Mode=TwoWay}" />
                    <sdk:Label Content="Web Site URL" Height="23" HorizontalAlignment="Left" Margin="10,50,0,0" Name="LabelWebsiteURL" VerticalAlignment="Top" Width="109" />
                            <TextBox Height="23" HorizontalAlignment="Left" Margin="96,50,0,0" Name="textBoxURL" VerticalAlignment="Top" Width="120" Text="{Binding Path=Feed.WebURL, Mode=TwoWay}" />
                    <sdk:Label Content="Copyright" Height="23" HorizontalAlignment="Left" Margin="10,89,0,0" Name="label3" VerticalAlignment="Top" Width="68" />
                            <TextBox Height="23" HorizontalAlignment="Left" Margin="96,89,0,0" Name="textBoxCopyright" VerticalAlignment="Top" Width="120" Text="{Binding Path=Feed.Copyright, Mode=TwoWay}" />
                    <sdk:Label Content="Language" Height="23" HorizontalAlignment="Left" Margin="10,127,0,0" Name="label4" VerticalAlignment="Top" Width="68" />
                            <TextBox Height="23" HorizontalAlignment="Left" Margin="96,127,0,0" Name="textBoxLanguage" VerticalAlignment="Top" Width="120" Text="{Binding Path=Feed.Language, Mode=TwoWay}" />
                    <sdk:Label Content="Editor" Height="23" HorizontalAlignment="Left" Margin="10,166,0,0" Name="label5" VerticalAlignment="Top" Width="50" />
                            <TextBox Height="23" HorizontalAlignment="Left" Margin="96,166,0,0" Name="textBoxEditor" VerticalAlignment="Top" Width="120" Text="{Binding Path=Feed.Editor, Mode=TwoWay}" />
                    <sdk:Label Content="Webmaster" Height="23" HorizontalAlignment="Left" Margin="10,205,0,0" Name="label6" VerticalAlignment="Top" Width="50" />
                            <TextBox Height="23" HorizontalAlignment="Left" Margin="96,205,0,0" Name="textBoxWebmaster" VerticalAlignment="Top" Width="120" Text="{Binding Path=Feed.Webmaster, Mode=TwoWay}" />
                    <sdk:Label Content="Subject" Height="23" HorizontalAlignment="Left" Margin="10,331,0,0" Name="label7" VerticalAlignment="Top" Width="50" />
                            <TextBox Height="23" HorizontalAlignment="Left" Margin="96,331,0,0" Name="textBoxSubject" VerticalAlignment="Top" Width="120" Text="{Binding Path=Feed.Subject, Mode=TwoWay}" />
                    <sdk:Label Content="Publish Date" Height="23" HorizontalAlignment="Left" Margin="10,379,0,0" Name="label2" VerticalAlignment="Top" Width="80" />
                    <sdk:Label Content="Last Build Date" Height="23" HorizontalAlignment="Left" Margin="10,418,0,0" Name="label8" VerticalAlignment="Top" Width="103"  />
                            <sdk:DatePicker Height="23" HorizontalAlignment="Right" Margin="0,372,6,0" Name="datePickerPublishDate" VerticalAlignment="Top" Width="120" Text="{Binding Path=Feed.PubDate, Mode=TwoWay}" />
                            <sdk:DatePicker Height="23" HorizontalAlignment="Left" Margin="119,412,0,0" Name="datePickerLastBuildDate" VerticalAlignment="Top" Width="120" Text="{Binding Path=Feed.LastBuildDate, Mode=TwoWay}" />
                    <sdk:Label Content="Description" Height="23" HorizontalAlignment="Left" Margin="10,248,0,0" Name="label12" VerticalAlignment="Top" Width="80" />
                            <TextBox Height="77" HorizontalAlignment="Left" Margin="96,248,0,0" Name="textBoxDescription" VerticalAlignment="Top" Width="120" VerticalScrollBarVisibility="Auto" Text="{Binding Path=Feed.Description, Mode=TwoWay}" />
                 
                </Grid>
            </sdk:TabItem>
            <sdk:TabItem Header="Image" Name="Image">
                <Grid>
                    <sdk:Label Content="URL" Height="23" HorizontalAlignment="Left" Margin="10,10,0,0" Name="label9" VerticalAlignment="Top" Width="50" />
                            <TextBox Height="23" HorizontalAlignment="Left" Margin="96,10,0,0" Name="textBoxImageURL" VerticalAlignment="Top" Width="120" Text="{Binding Path=Feed.ImgURL, Mode=TwoWay}" />
                    <sdk:Label Content="Title" Height="23" HorizontalAlignment="Left" Margin="10,50,0,0" Name="label10" VerticalAlignment="Top" Width="80" />
                            <TextBox Height="23" HorizontalAlignment="Left" Margin="96,50,0,0" Name="textBoxWidth" VerticalAlignment="Top" Width="120" Text="{Binding Path=Feed.ImgTitle, Mode=TwoWay}" />
                    <sdk:Label Content="Link" Height="23" HorizontalAlignment="Left" Margin="10,89,0,0" Name="label11" VerticalAlignment="Top" Width="50" />
                            <TextBox Height="23" HorizontalAlignment="Left" Margin="96,89,0,0" Name="textBoxHeight" VerticalAlignment="Top" Width="120"  Text="{Binding Path=Feed.ImgLink, Mode=TwoWay}"/>
                </Grid>
            </sdk:TabItem>
            <sdk:TabItem Header="StyleSheet" Name="StyleSheet">
                <Grid>
                    <sdk:Label Content="Type" Height="23" HorizontalAlignment="Left" Margin="10,10,0,0" Name="label13" VerticalAlignment="Top" Width="50" />
                            <TextBox Height="23" HorizontalAlignment="Left" Margin="96,10,0,0" Name="textBoxType" VerticalAlignment="Top" Width="120" Text="{Binding Path=Feed.StyleSheet, Mode=TwoWay}" />
                    <sdk:Label Content="Link" Height="23" HorizontalAlignment="Left" Margin="10,50,0,0" Name="label14" VerticalAlignment="Top" Width="80" />
                            <TextBox Height="23" HorizontalAlignment="Left" Margin="96,50,0,0" Name="textBoxLink" VerticalAlignment="Top" Width="120"  Text="{Binding Path=Feed.StyleType, Mode=TwoWay}"/>
                </Grid>
            </sdk:TabItem>
        </sdk:TabControl>
<!--<sdk:GridSplitter Grid.RowSpan="3" Margin="273,-9,0,9" HorizontalAlignment="Left" />-->
                <StackPanel Grid.Column="1" Grid.Row="1">
                    <sdk:DataGrid x:Name="dg" AutoGenerateColumns="False" 
             HeadersVisibility="All" Margin="0,2,0,0" IsReadOnly="True" CanUserResizeColumns="False" ItemsSource="{Binding ItemsPaged}" Height="170" VerticalAlignment="Top" HorizontalAlignment="Left" Width="700" >
                   <sdk:DataGrid.Columns>
                        <sdk:DataGridTextColumn Binding="{Binding Title}" Header="Title" Width="500"></sdk:DataGridTextColumn>
                            <sdk:DataGridTextColumn Binding="{Binding PubDate}" Header="PubDate" Width="200"></sdk:DataGridTextColumn>
                    </sdk:DataGrid.Columns>
                </sdk:DataGrid>
                <sdk:DataPager x:Name="DataGridPager" Margin="0, 0, 0, 10" HorizontalAlignment="Left" VerticalAlignment="Top" DisplayMode="FirstLastPreviousNext" PageSize="5" 
                        Source="{Binding Path=ItemsPaged}" Width="700">
                </sdk:DataPager>
                    <datacontrols:DataForm x:Name="DataBrowser"  Width="700"  AutoGenerateFields="True" ItemsSource="{Binding ItemsPaged}" AutoEdit="False" >
                            
                          </datacontrols:DataForm>
                </StackPanel>
            </Grid>
    </StackPanel>
    </ScrollViewer>
</navigation:Page>
